﻿using CUREBusinessLogicLayer.Harmful;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CURE.Collect
{
    public partial class ApprovalResult : System.Web.UI.Page
    {
        #region 变量
        private string ledgerid;

        public string Ledgerid
        {
            get { return ledgerid; }
            set { ledgerid = value; }
        }
        private string fid;

        public string Fid
        {
            get { return fid; }
            set { fid = value; }
        }
        private string approvaltype;

        public string Approvaltype
        {
            get { return approvaltype; }
            set { approvaltype = value; }
        }
        private string approvalvalue;

        public string Approvalvalue
        {
            get { return approvalvalue; }
            set { approvalvalue = value; }
        }
        private string approvalreason;

        public string Approvalreason
        {
            get { return approvalreason; }
            set { approvalreason = value; }
        }
        private string approvaltime;

        public string Approvaltime
        {
            get { return approvaltime; }
            set { approvaltime = value; }
        }
        #endregion

        private LedgerBll ledgerbll = new LedgerBll();

        protected void Page_Load(object sender, EventArgs e)
        {
            approvaltype = Request.QueryString["type"];
            ledgerid = Request.QueryString["lid"];
            fid = Request.QueryString["fid"];
           DataTable dt = GetApproval(ledgerid, approvaltype);
           if (dt != null && dt.Rows.Count > 0)
           {
               approvalvalue = dt.Rows[0]["APPROVALVALUE"].ToString();
               approvalreason = dt.Rows[0]["REASON"].ToString();
               approvaltime = dt.Rows[0]["APPROVALTIME"].ToString();
           }

        }

        private DataTable GetApproval(string ledgerid,string type)
        {
            return ledgerbll.GetApprovalInfo(ledgerid, type);
        }

    }
}